#include "BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h"
#ifdef __cplusplus
extern "C" {
#endif
btTriangleMeshShapeData* bullet_NewbtTriangleMeshShapeData(){
	btTriangleMeshShapeData* wrap_out = new btTriangleMeshShapeData();
	return wrap_out;
}

float bullet_btTriangleMeshShapeData_GetFieldOfM_collisionMargin(btTriangleMeshShapeData* c_this){
	return (float)(c_this->m_collisionMargin);
}

btCollisionShapeData* bullet_btTriangleMeshShapeData_GetFieldOfM_collisionShapeData(btTriangleMeshShapeData* c_this){
	return (btCollisionShapeData*)(&c_this->m_collisionShapeData);
}

btStridingMeshInterfaceData* bullet_btTriangleMeshShapeData_GetFieldOfM_meshInterface(btTriangleMeshShapeData* c_this){
	return (btStridingMeshInterfaceData*)(&c_this->m_meshInterface);
}

char** bullet_btTriangleMeshShapeData_GetFieldOfM_pad3(btTriangleMeshShapeData* c_this){
	return (char**)(&c_this->m_pad3);
}

btQuantizedBvhDoubleData** bullet_btTriangleMeshShapeData_GetFieldOfM_quantizedDoubleBvh(btTriangleMeshShapeData* c_this){
	return (btQuantizedBvhDoubleData**)(&c_this->m_quantizedDoubleBvh);
}

btQuantizedBvhFloatData** bullet_btTriangleMeshShapeData_GetFieldOfM_quantizedFloatBvh(btTriangleMeshShapeData* c_this){
	return (btQuantizedBvhFloatData**)(&c_this->m_quantizedFloatBvh);
}

btTriangleInfoMapData** bullet_btTriangleMeshShapeData_GetFieldOfM_triangleInfoMap(btTriangleMeshShapeData* c_this){
	return (btTriangleInfoMapData**)(&c_this->m_triangleInfoMap);
}

btBvhTriangleMeshShape* bullet_NewbtBvhTriangleMeshShape(btStridingMeshInterface* meshInterface,bool useQuantizedAabbCompression,bool buildBvh){
	btStridingMeshInterface * c_arg_meshInterface=(btStridingMeshInterface *)(void*)(meshInterface);
	bool c_arg_useQuantizedAabbCompression=useQuantizedAabbCompression;
	bool c_arg_buildBvh=buildBvh;
	btBvhTriangleMeshShape* wrap_out = new btBvhTriangleMeshShape(c_arg_meshInterface,c_arg_useQuantizedAabbCompression,c_arg_buildBvh);
	return wrap_out;
}

btBvhTriangleMeshShape* bullet_NewbtBvhTriangleMeshShape1(btStridingMeshInterface* meshInterface,bool useQuantizedAabbCompression,btVector3* bvhAabbMin,btVector3* bvhAabbMax,bool buildBvh){
	btStridingMeshInterface * c_arg_meshInterface=(btStridingMeshInterface *)(void*)(meshInterface);
	bool c_arg_useQuantizedAabbCompression=useQuantizedAabbCompression;
	btVector3 const& c_arg_bvhAabbMin=(btVector3 const&)(*bvhAabbMin);
	btVector3 const& c_arg_bvhAabbMax=(btVector3 const&)(*bvhAabbMax);
	bool c_arg_buildBvh=buildBvh;
	btBvhTriangleMeshShape* wrap_out = new btBvhTriangleMeshShape(c_arg_meshInterface,c_arg_useQuantizedAabbCompression,c_arg_bvhAabbMin,c_arg_bvhAabbMax,c_arg_buildBvh);
	return wrap_out;
}

void bullet_btBvhTriangleMeshShape_buildOptimizedBvh(btBvhTriangleMeshShape* c_this){
	c_this->buildOptimizedBvh();
}

btOptimizedBvh* bullet_btBvhTriangleMeshShape_getOptimizedBvh(btBvhTriangleMeshShape* c_this){
	btOptimizedBvh * c_out = c_this->getOptimizedBvh();
	btOptimizedBvh* wrap_out = (btOptimizedBvh*)(void*)(c_out);
	return wrap_out;
}

bool bullet_btBvhTriangleMeshShape_getOwnsBvh(btBvhTriangleMeshShape* c_this){
	bool c_out = c_this->getOwnsBvh();
	bool wrap_out = (c_out);
	return wrap_out;
}

btTriangleInfoMap* bullet_btBvhTriangleMeshShape_getTriangleInfoMap(btBvhTriangleMeshShape* c_this){
	btTriangleInfoMap const * c_out = c_this->getTriangleInfoMap();
	btTriangleInfoMap* wrap_out = (btTriangleInfoMap*)(void*)(c_out);
	return wrap_out;
}

btTriangleInfoMap* bullet_btBvhTriangleMeshShape_getTriangleInfoMap1(btBvhTriangleMeshShape* c_this){
	btTriangleInfoMap * c_out = c_this->getTriangleInfoMap();
	btTriangleInfoMap* wrap_out = (btTriangleInfoMap*)(void*)(c_out);
	return wrap_out;
}

void bullet_btBvhTriangleMeshShape_partialRefitTree(btBvhTriangleMeshShape* c_this,btVector3* aabbMin,btVector3* aabbMax){
	btVector3 const& c_arg_aabbMin=(btVector3 const&)(*aabbMin);
	btVector3 const& c_arg_aabbMax=(btVector3 const&)(*aabbMax);
	c_this->partialRefitTree(c_arg_aabbMin,c_arg_aabbMax);
}

void bullet_btBvhTriangleMeshShape_performConvexcast(btBvhTriangleMeshShape* c_this,btTriangleCallback* callback,btVector3* boxSource,btVector3* boxTarget,btVector3* boxMin,btVector3* boxMax){
	btTriangleCallback * c_arg_callback=(btTriangleCallback *)(void*)(callback);
	btVector3 const& c_arg_boxSource=(btVector3 const&)(*boxSource);
	btVector3 const& c_arg_boxTarget=(btVector3 const&)(*boxTarget);
	btVector3 const& c_arg_boxMin=(btVector3 const&)(*boxMin);
	btVector3 const& c_arg_boxMax=(btVector3 const&)(*boxMax);
	c_this->performConvexcast(c_arg_callback,c_arg_boxSource,c_arg_boxTarget,c_arg_boxMin,c_arg_boxMax);
}

void bullet_btBvhTriangleMeshShape_performRaycast(btBvhTriangleMeshShape* c_this,btTriangleCallback* callback,btVector3* raySource,btVector3* rayTarget){
	btTriangleCallback * c_arg_callback=(btTriangleCallback *)(void*)(callback);
	btVector3 const& c_arg_raySource=(btVector3 const&)(*raySource);
	btVector3 const& c_arg_rayTarget=(btVector3 const&)(*rayTarget);
	c_this->performRaycast(c_arg_callback,c_arg_raySource,c_arg_rayTarget);
}

void bullet_btBvhTriangleMeshShape_refitTree(btBvhTriangleMeshShape* c_this,btVector3* aabbMin,btVector3* aabbMax){
	btVector3 const& c_arg_aabbMin=(btVector3 const&)(*aabbMin);
	btVector3 const& c_arg_aabbMax=(btVector3 const&)(*aabbMax);
	c_this->refitTree(c_arg_aabbMin,c_arg_aabbMax);
}

void bullet_btBvhTriangleMeshShape_setOptimizedBvh(btBvhTriangleMeshShape* c_this,btOptimizedBvh* bvh,btVector3* localScaling){
	btOptimizedBvh * c_arg_bvh=(btOptimizedBvh *)(void*)(bvh);
	btVector3 const& c_arg_localScaling=(btVector3 const&)(*localScaling);
	c_this->setOptimizedBvh(c_arg_bvh,c_arg_localScaling);
}

void bullet_btBvhTriangleMeshShape_setTriangleInfoMap(btBvhTriangleMeshShape* c_this,btTriangleInfoMap* triangleInfoMap){
	btTriangleInfoMap * c_arg_triangleInfoMap=(btTriangleInfoMap *)(void*)(triangleInfoMap);
	c_this->setTriangleInfoMap(c_arg_triangleInfoMap);
}

bool bullet_btBvhTriangleMeshShape_usesQuantizedAabbCompression(btBvhTriangleMeshShape* c_this){
	bool c_out = c_this->usesQuantizedAabbCompression();
	bool wrap_out = (c_out);
	return wrap_out;
}

#ifdef __cplusplus
}
#endif
